#include <iostream>
using namespace std;

class Library;
class Visitor{
	public:
		void visit(Library *);
};

class Library{
	private:
		Visitor *vis;
	public:
		Library(Visitor *_v){
			vis=_v;
		}
		void Accept(){
			if (1){
				vis->visit(this);
			}
		}
		void Do(){
			cout<<"Do~"<<endl;
		}
};

void Visitor::visit(Library *pl){
			pl->Do();
		}

int main(void){
	Visitor *v=new Visitor();
	Library *l=new Library(v);
	l->Accept(); 
	return 0;
}
